#ifndef __OBJECT_H__
#define __OBJECT_H__
/////////////////
//include
/////////////////
#include"Vector3D.h"
#include"Sphere.h"
#include"Box.h"
#include"../CXBurst/Array.h"
#include"Polygons.h"

/////////////////
//const
/////////////////

/////////////////
//class
/////////////////
class Model;
class DeviceContext;
class Device;
struct OctreeInfo;
class Object
{
public:
	Object();
	virtual ~Object();
	virtual void		Init();
	virtual void		ContentLoad(Device* device)	= 0;
	virtual void		Update()		= 0;
	virtual void		Draw(DeviceContext* device_context) = 0;
	bool Collision(const Object* obj);

	void		SetPos(Vector3D pos){this->pos = pos;}
	void		SetRot(Vector3D rot){this->rot = rot;}
	void		SetScale(Vector3D scale){this->scale = scale;}
	void		SetScale(float scale){this->scale = Vector3D(scale,scale,scale);}
	void		SetModel(Model* model){this->model = model;}
	void		SetIsEnable(bool is_enable){this->is_enable = is_enable;};
	
	Vector3D	GetPos()	const{return pos;}
	Vector3D	GetRot()	const{return rot;}
	Vector3D	GetScale()	const{return scale;}
	int			GetnAnimationCount()	const{return now_animation_count;}
	int			GetnAnimationIndex()	const{return now_animation_index;}
	Model*		GetModel()	const{return model;}
	Polygons	GetPolygons()	const;
	bool GetIsDead()const{return !is_enable;}
protected:
	Model* model;
	Vector3D pos;
	Vector3D rot;
	Vector3D scale;
	int now_animation_count;
	int now_animation_index;
	Array<OctreeInfo*> octree_info;
	bool is_enable;
};
#endif __OBJECT_H__
